package ar.edu.unq.wannaplay.pages.client;

import org.apache.wicket.spring.injection.annot.SpringBean;

import ar.edu.unq.wannaplay.pages.WPPage;
import ar.edu.unq.wannaplay.panels.client.NewClientPanel;
import ar.edu.unq.wannaplay.services.ClientService;
import ar.edu.unq.wannaplay.utils.ClientEditer;

public class NewClientPage extends WPPage {

    @SpringBean(name = "service.clientService")
    private ClientService service;

    private ClientEditer modelObject;

    public NewClientPage() {
        super("Add new Client Page");
        this.setModelObject(new ClientEditer());
        this.initialize();
        this.addLanguageSelect();
    }

    @Override
    protected void addMainContent() {
        this.add(new NewClientPanel("mainContent", this.getModelObject(), this.getService(), this.getFeedBackPanel()));
    }

    public void setModelObject(final ClientEditer modelObject) {
        this.modelObject = modelObject;
    }

    public ClientEditer getModelObject() {
        return modelObject;
    }

    public void setService(final ClientService service) {
        this.service = service;
    }

    public ClientService getService() {
        return service;
    }

}
